#include <iostream>
using namespace std;
 
int main()
{
    string tmp, str;
    cin >> tmp;
    int n = tmp.size();
    for(int i = 0; i < n; ++i)
    {
        if(tmp[i] != '-')
            str += tmp[i];
    }
 
    long long x = 0;
    // cout << str << endl;
    for(int i = 0; i < str.size() - 1; ++i)
    {
        x += ((str[i] - '0') * (i + 1));
        // cout << x << " "; 
    }
    // cout << endl;
 
    int val = x % 11;
    char ch;
    if(val == 10)
        ch = 'X';
    else
        ch = val + '0';
 
    if(tmp[n - 1] == ch)
        cout << "Right" << endl;
    else
    {
        tmp[n - 1] = ch;
        cout << tmp << endl;
    }
 
    // cout << x << " " << " " << val << " " << ch << endl;
    return 0;
}